<?php
/*
	页面类型
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
model('core/core')->checklogin();
$return['setting']=$this->plugin_setting('setting');
if($_RQ['op']=='main'){
	if($_RQ['code']){
		$return['item']['code']=trim($_RQ['code']);
		$code=pdo_get('jy_exchange_code',array('key'=>trim($_RQ['code']),'uniacid'=>$_SESSION['uniacid']));
		$info=pdo_get('jy_exchange_group',array('id'=>$code['groupid'],'uniacid'=>$_SESSION['uniacid']));
		$return['rule']=$info['rule'];
	}elseif($_RQ['groupid']){
		$info=pdo_get('jy_exchange_group',array('id'=>$_RQ['groupid']));
		$return['rule']=$info['rule'];
	}
	set_html('title','兑换中心');
	exi($return);
}